<template>
	<view style="height: 100%;">
		<view class="Layout">
			<view class="ListBox" v-for="(item,index) in ListInfo" :key="index">
					<view class="felxBox">
						<view class="bold">
							提现：{{item.pdc_sn}}
						</view>
						<view class="cBF">
							￥{{item.pdc_amount}}
						</view>
					</view>
					<view class="felxBox">
						<view class="">
							提现类型:{{item.pdc_payment_type==0?"银行卡":"支付宝"}}
						</view>
						<view class="c999">
							{{item.pdc_add_time |formaDate}}
						</view>
					</view>
				</view>
		</view>
		<view v-if="ListInfo.length==0" class="IfNull">
				<image style="width: 100%" :src="`${picUrl}/InfoNull.png`" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ListInfo:[],
				curpage:1,
				hasmore:false
			}
		},
		created() {
			this.getList();
		},
		onReachBottom(){
			if(this.hasmore){
				this.getList(true)
			}else{
				uni.showToast({
					title:'到底了哦~~',
					icon:'none'
				})
			}
		},
		methods: {
			getList(state=false){//获取列表
				let that = this;
					this.$util.request({
						url: '/mobile/index.php?act=member_index&op=pd_cash_list',
						method: 'get',
						data: {curpage:that.curpage},
					}).then(function(res) {
						that.hasmore=res.datas.paged.hasmore
						if(state){
							that.ListInfo=that.ListInfo.concat(res.datas.list)  
						}else{
							that.ListInfo=res.datas.list
						}
						if(that.hasmore){
						    that.curpage++;
							that.getList(state=true)
						}
					})
			},
			
		}
	}
</script>

<style>
	.IfNull{
		font-size: 30rpx;
		text-align: center;
		height: 100%;
		background-color: #fff;
		font-weight: bold;
	}
	.Layout{
		padding: 0 15px;
		    background: #fff;
			border-bottom: 1rpx solid #EEEEEE;
	}
	.bold{
		font-weight: bold;
		color: #333333;
	}
	.cBF{
		color: #ff4300;
	}
	.c999{
		color: #999999;
	}
	.ListBox{
		padding: 20rpx;
		line-height: 100rpx;
	}
	.felxBox{
		display: flex;
		justify-content: space-between;
		align-items: center;
		}
</style>
